//
//  Configuration.m
//  basket
//
//  Created by xujing on 16/1/15.
//  Copyright © 2016年 xujing. All rights reserved.
//

#import "Configuration.h"

Boolean isSalerLogin = NO;
StoreModel *loginSalerInfo = nil;
NSString *token = nil;
int selfRank = -1;
NSMutableArray *nations = nil;
BOOL isTokenTimeOut = NO;//token是否过期
@implementation Configuration

+ (void)storeConfFile:(NSString *)fileName :(NSString *)content {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documents = [paths objectAtIndex:0];
    NSString *database_path = [documents stringByAppendingPathComponent:fileName];
    
   // [content writeToFile:database_path atomically:YES ];
    [content writeToFile:database_path atomically:YES] ? @"Succeed":@"Failed";
}

+ (NSString *)getConfBaseUrl {
    return baseUrl;
}

+ (NSString *)getImageUrl {
    return baseImageUrl;
}

+ (NSMutableArray *)getNations {
    
    if(nil == nations){
        nations = [NSMutableArray arrayWithObjects:@"汉族",@"土家族",@"阿昌族",@"白族" ,@"保安族" ,@"布朗族" ,@"布依族" ,@"朝鲜族" ,@"达斡尔族" ,@"傣族" ,@"德昂族" ,@"侗族" ,@"东乡族" ,@"独龙族" ,@"鄂伦春族" ,@"俄罗斯族" ,@"鄂温克族" ,@"高山族" ,@"仡佬族" ,@"哈尼族",@"哈萨克族",@"赫哲族",@"回族",@"基诺族",@"京族",@"景颇族",@"柯尔克孜族",@"拉祜族",@"黎族",@"傈僳族",@"珞巴族",@"满族",@"毛南族",@"门巴族",@"蒙古族",@"苗族",@"仫佬族",@"纳西族",@"怒族",@"普米族",@"羌族",@"撒拉族",@"畲族",@"水族",@"塔吉克族",@"塔塔尔族",@"土族",@"土家族",@"佤族",@"维吾尔族",@"乌兹别克族",@"锡伯族",@"瑶族",@"彝族",@"裕固族",@"藏族",@"壮族",nil];
    }
    return nations;
}

//+ (void)updateSaler{
//    [[DataBaseManager sharedFMDBManager] insertSalerPeople:loginSalerInfo];
//}

@end


